<template>
	<div>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell mui-media" v-for="item in msg" :key="item.id">
				<a href="javascript:;">
					<img class="mui-media-object mui-pull-left" :src="item.imgurl">
					<div class="mui-media-body">
						<h3>{{item.title}}</h3>
						<p class='mui-ellipsis'>
							<span>发表时间:{{item.date}}</span>
							<span>点击数:{{item.click}}次</span>
						</p>
					</div>
				</a>
			</li>
		</ul>
		<com></com>
	</div>
</template>

<script>
	import com from '../soncomponents/com.vue'
	export default {
		data() {
			return {
				msg: []
			}
		},
		created() {
			this.getInfo()
		},
		methods: {
			getInfo() {
				this.$http.get("test").then(result => {
					// console.log(JSON.parse(result.body))
					this.msg = JSON.parse(result.body).msg
					console.log(this.msg)
				})
			}
		},
		components:{com}
	}
</script>

<style>
	.mui-media-body h3 {
		font-size: 14px;
	}

	.mui-media-body span {
		font-size: 12px;
		color: #226aff;
	}

	.mui-ellipsis {
		display: flex;
		justify-content: space-between;
	}
</style>
